/**
 * 
 */
package defi4;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Logan
 *
 */
public class Empreinte {

	public List<CycleLettre> cycles;


	public Empreinte() {
		cycles = new ArrayList<CycleLettre>();

	}

	public String toString() {
		String res = "";
		for(int i = 1; i<=cycles.size(); i++ ) {
			res += "\nAlphabet " + i + " : ";
			res+= cycles.get(i-1);
		}

		return res;
	}
	
	
	public boolean equals(Object o) {
		Empreinte tmp = (Empreinte)o;

		if(cycles.size() != tmp.cycles.size()) {
			return false;
		}

		for(int i = 0; i<cycles.size(); i++) {
			if(!cycles.get(i).equals(tmp.cycles.get(i))) {
				return false;
			}
		}


		return true;
	}

}
